package me.liuyu.ymall.member.point.DO;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;

/**
 * <p>
 * 会员积分记录
 * </p>
 *
 * @author liuyu
 * @since 2018-06-07
 */
@TableName("member_point_his")
public class MemberPointHis extends Model<MemberPointHis> {

    private static final long serialVersionUID = 1L;

	private Long id;
	@TableField("activity_id")
	private Long activityId;
	@TableField("member_id")
	private Long memberId;
	@TableField("init_value")
	private Integer initValue;
	@TableField("point_value")
	private Integer pointValue;
	@TableField("lastest_value")
	private Integer lastestValue;
	@TableField("reason_msg")
	private String reasonMsg;
	@TableField("create_time")
	private Date createTime;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getActivityId() {
		return activityId;
	}

	public void setActivityId(Long activityId) {
		this.activityId = activityId;
	}

	public Integer getInitValue() {
		return initValue;
	}

	public void setInitValue(Integer initValue) {
		this.initValue = initValue;
	}

	public Integer getPointValue() {
		return pointValue;
	}

	public void setPointValue(Integer pointValue) {
		this.pointValue = pointValue;
	}

	public Integer getLastestValue() {
		return lastestValue;
	}

	public void setLastestValue(Integer lastestValue) {
		this.lastestValue = lastestValue;
	}

	public String getReasonMsg() {
		return reasonMsg;
	}

	public void setReasonMsg(String reasonMsg) {
		this.reasonMsg = reasonMsg;
	}

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

    @Override
    public String toString() {
        return "MemberPointHis{" +
                "id=" + id +
                ", activityId=" + activityId +
                ", memberId=" + memberId +
                ", initValue=" + initValue +
                ", pointValue=" + pointValue +
                ", lastestValue=" + lastestValue +
                ", reasonMsg='" + reasonMsg + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
